
<h1><span class="yiyi-st" id="yiyi-12">numpy.core.defchararray.chararray</span></h1>
        <blockquote>
        <p>原文：<a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.core.defchararray.chararray.html">https://docs.scipy.org/doc/numpy/reference/generated/numpy.core.defchararray.chararray.html</a></p>
        <p>译者：<a href="https://github.com/wizardforcel">飞龙</a> <a href="http://usyiyi.cn/">UsyiyiCN</a></p>
        <p>校对：（虚位以待）</p>
        </blockquote>
    
<dl class="class">
<dt id="numpy.core.defchararray.chararray"><span class="yiyi-st" id="yiyi-13"> <em class="property">class </em><code class="descclassname">numpy.core.defchararray.</code><code class="descname">chararray</code><a class="reference external" href="http://github.com/numpy/numpy/blob/v1.11.3/numpy/core/defchararray.py#L1669-L2475"><span class="viewcode-link">[source]</span></a></span></dt>
<dd><p><span class="yiyi-st" id="yiyi-14">提供了一个方便的查看数组的字符串和unicode值。</span></p>
<div class="admonition note">
<p class="first admonition-title"><span class="yiyi-st" id="yiyi-15">注意</span></p>
<p class="last"><span class="yiyi-st" id="yiyi-16">存在<a class="reference internal" href="#numpy.core.defchararray.chararray" title="numpy.core.defchararray.chararray"><code class="xref py py-obj docutils literal"><span class="pre">chararray</span></code></a>类以向后兼容Numarray，因此不推荐用于新开发。</span><span class="yiyi-st" id="yiyi-17">Starting from numpy 1.4, if one needs arrays of strings, it is recommended to use arrays of <a class="reference internal" href="numpy.core.defchararray.chararray.dtype.html#numpy.core.defchararray.chararray.dtype" title="numpy.core.defchararray.chararray.dtype"><code class="xref py py-obj docutils literal"><span class="pre">dtype</span></code></a> <code class="xref py py-obj docutils literal"><span class="pre">object_</span></code>, <code class="xref py py-obj docutils literal"><span class="pre">string_</span></code> or <code class="xref py py-obj docutils literal"><span class="pre">unicode_</span></code>, and use the free functions in the <code class="xref py py-obj docutils literal"><span class="pre">numpy.char</span></code> module for fast vectorized string operations.</span></p>
</div>
<p><span class="yiyi-st" id="yiyi-18">与类型<em class="xref py py-obj">str</em>或<em class="xref py py-obj">unicode</em>的常规Numpy数组相比，此类添加了以下功能：</span></p>
<blockquote>
<div><ol class="arabic simple">
<li><span class="yiyi-st" id="yiyi-19">值将在索引时自动从结尾处删除空格</span></li>
<li><span class="yiyi-st" id="yiyi-20">比较运算符在比较值时从结尾自动删除空格</span></li>
<li><span class="yiyi-st" id="yiyi-21">向量化字符串操作作为方法（例如<a class="reference internal" href="numpy.core.defchararray.chararray.endswith.html#numpy.core.defchararray.chararray.endswith" title="numpy.core.defchararray.chararray.endswith"><code class="xref py py-obj docutils literal"><span class="pre">endswith</span></code></a>）和中缀运算符（例如，<code class="docutils literal"><span class="pre">“+”，</span> <span class="pre">“*”，</span> <span class="pre">“％”</span></code>）</span></li>
</ol>
</div></blockquote>
<p><span class="yiyi-st" id="yiyi-22">应使用<code class="xref py py-obj docutils literal"><span class="pre">numpy.char.array</span></code>或<code class="xref py py-obj docutils literal"><span class="pre">numpy.char.asarray</span></code>创建chararrays，而不是直接使用此构造函数。</span></p>
<p><span class="yiyi-st" id="yiyi-23">如果不是<code class="docutils literal"><span class="pre">None</span></code>，则此构造函数使用<em class="xref py py-obj">缓冲区</em>（<em class="xref py py-obj">偏移</em>和<a class="reference internal" href="numpy.core.defchararray.chararray.strides.html#numpy.core.defchararray.chararray.strides" title="numpy.core.defchararray.chararray.strides"><code class="xref py py-obj docutils literal"><span class="pre">strides</span></code></a>）创建数组。</span><span class="yiyi-st" id="yiyi-24">如果<em class="xref py py-obj">缓冲区</em>为<code class="docutils literal"><span class="pre">None</span></code>，则在“C顺序”中构建一个新的数组与<a class="reference internal" href="numpy.core.defchararray.chararray.strides.html#numpy.core.defchararray.chararray.strides" title="numpy.core.defchararray.chararray.strides"><code class="xref py py-obj docutils literal"><span class="pre">strides</span></code></a>，除非<code class="docutils literal"><span class="pre">len ）</span> <span class="pre">＆gt； =</span> <span class="pre">2</span></code>和<code class="docutils literal"><span class="pre">order=&apos;Fortran&apos;</span></code>，在这种情况下<a class="reference internal" href="numpy.core.defchararray.chararray.strides.html#numpy.core.defchararray.chararray.strides" title="numpy.core.defchararray.chararray.strides"><code class="xref py py-obj docutils literal"><span class="pre">strides</span></code></a></span></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name">
<col class="field-body">
<tbody valign="top">
<tr class="field-odd field"><th class="field-name"><span class="yiyi-st" id="yiyi-25">参数：</span></th><td class="field-body"><p class="first"><span class="yiyi-st" id="yiyi-26"><strong>shape</strong>：tuple</span></p>
<blockquote>
<div><p><span class="yiyi-st" id="yiyi-27">数组的形状。</span></p>
</div></blockquote>
<p><span class="yiyi-st" id="yiyi-28"><strong>itemsize</strong>：int，可选</span></p>
<blockquote>
<div><p><span class="yiyi-st" id="yiyi-29">每个数组元素的长度，以字符数表示。</span><span class="yiyi-st" id="yiyi-30">默认值为1。</span></p>
</div></blockquote>
<p><span class="yiyi-st" id="yiyi-31"><strong>unicode</strong>：bool，可选</span></p>
<blockquote>
<div><p><span class="yiyi-st" id="yiyi-32">是数组元素类型unicode（True）或字符串（False）。</span><span class="yiyi-st" id="yiyi-33">默认值为False。</span></p>
</div></blockquote>
<p><span class="yiyi-st" id="yiyi-34"><strong>缓冲</strong>：int，可选</span></p>
<blockquote>
<div><p><span class="yiyi-st" id="yiyi-35">数组数据的起始的内存地址。</span><span class="yiyi-st" id="yiyi-36">默认值为None，在这种情况下创建一个新的数据组。</span></p>
</div></blockquote>
<p><span class="yiyi-st" id="yiyi-37"><strong>offset</strong>：int，可选</span></p>
<blockquote>
<div><p><span class="yiyi-st" id="yiyi-38">固定步幅位移从一个轴的开始？</span><span class="yiyi-st" id="yiyi-39">默认值为0。</span><span class="yiyi-st" id="yiyi-40">需要&gt; = 0。</span></p>
</div></blockquote>
<p><span class="yiyi-st" id="yiyi-41"><strong>strides</strong>：array_like of ints，可选</span></p>
<blockquote>
<div><p><span class="yiyi-st" id="yiyi-42">数组的步幅（有关完整说明，请参阅<code class="xref py py-obj docutils literal"><span class="pre">ndarray.strides</span></code>）。</span><span class="yiyi-st" id="yiyi-43">默认值为None。</span></p>
</div></blockquote>
<p><span class="yiyi-st" id="yiyi-44"><strong>order</strong>：{&apos;C&apos;，&apos;F&apos;}，可选</span></p>
<blockquote class="last">
<div><p><span class="yiyi-st" id="yiyi-45">数组数据存储在存储器中的顺序：&apos;C&apos; - &gt;“行主”顺序（默认），&apos;F&apos; - &gt;“列主”（Fortran）顺序。</span></p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<p class="rubric"><span class="yiyi-st" id="yiyi-46">例子</span></p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">charar</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">chararray</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">charar</span><span class="p">[:]</span> <span class="o">=</span> <span class="s1">&apos;a&apos;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">charar</span>
<span class="go">chararray([[&apos;a&apos;, &apos;a&apos;, &apos;a&apos;],</span>
<span class="go">       [&apos;a&apos;, &apos;a&apos;, &apos;a&apos;],</span>
<span class="go">       [&apos;a&apos;, &apos;a&apos;, &apos;a&apos;]],</span>
<span class="go">      dtype=&apos;|S1&apos;)</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">charar</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">chararray</span><span class="p">(</span><span class="n">charar</span><span class="o">.</span><span class="n">shape</span><span class="p">,</span> <span class="n">itemsize</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">charar</span><span class="p">[:]</span> <span class="o">=</span> <span class="s1">&apos;abc&apos;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">charar</span>
<span class="go">chararray([[&apos;abc&apos;, &apos;abc&apos;, &apos;abc&apos;],</span>
<span class="go">       [&apos;abc&apos;, &apos;abc&apos;, &apos;abc&apos;],</span>
<span class="go">       [&apos;abc&apos;, &apos;abc&apos;, &apos;abc&apos;]],</span>
<span class="go">      dtype=&apos;|S5&apos;)</span>
</pre></div>
</div>
<p class="rubric"><span class="yiyi-st" id="yiyi-47">属性</span></p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-48"><a class="reference internal" href="numpy.core.defchararray.chararray.T.html#numpy.core.defchararray.chararray.T" title="numpy.core.defchararray.chararray.T"><code class="xref py py-obj docutils literal"><span class="pre">T</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-49">与self.transpose()相同，除非self是self.ndim返回</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-50"><a class="reference internal" href="numpy.core.defchararray.chararray.base.html#numpy.core.defchararray.chararray.base" title="numpy.core.defchararray.chararray.base"><code class="xref py py-obj docutils literal"><span class="pre">base</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-51">如果内存是来自某个其他对象的基本对象。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-52"><a class="reference internal" href="numpy.core.defchararray.chararray.ctypes.html#numpy.core.defchararray.chararray.ctypes" title="numpy.core.defchararray.chararray.ctypes"><code class="xref py py-obj docutils literal"><span class="pre">ctypes</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-53">一个对象，用于简化数组与ctypes模块的交互。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-54"><a class="reference internal" href="numpy.core.defchararray.chararray.data.html#numpy.core.defchararray.chararray.data" title="numpy.core.defchararray.chararray.data"><code class="xref py py-obj docutils literal"><span class="pre">data</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-55">Python缓冲区对象指向数组的数据的开始。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-56"><a class="reference internal" href="numpy.core.defchararray.chararray.dtype.html#numpy.core.defchararray.chararray.dtype" title="numpy.core.defchararray.chararray.dtype"><code class="xref py py-obj docutils literal"><span class="pre">dtype</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-57">数组元素的数据类型。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-58"><a class="reference internal" href="numpy.core.defchararray.chararray.flags.html#numpy.core.defchararray.chararray.flags" title="numpy.core.defchararray.chararray.flags"><code class="xref py py-obj docutils literal"><span class="pre">flags</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-59">有关数组的内存布局的信息。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-60"><a class="reference internal" href="numpy.core.defchararray.chararray.flat.html#numpy.core.defchararray.chararray.flat" title="numpy.core.defchararray.chararray.flat"><code class="xref py py-obj docutils literal"><span class="pre">flat</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-61">数组上的1-D迭代器。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-62"><a class="reference internal" href="numpy.core.defchararray.chararray.imag.html#numpy.core.defchararray.chararray.imag" title="numpy.core.defchararray.chararray.imag"><code class="xref py py-obj docutils literal"><span class="pre">imag</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-63">数组的虚部。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-64"><a class="reference internal" href="numpy.core.defchararray.chararray.itemsize.html#numpy.core.defchararray.chararray.itemsize" title="numpy.core.defchararray.chararray.itemsize"><code class="xref py py-obj docutils literal"><span class="pre">itemsize</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-65">一个数组元素的长度（以字节为单位）。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-66"><a class="reference internal" href="numpy.core.defchararray.chararray.nbytes.html#numpy.core.defchararray.chararray.nbytes" title="numpy.core.defchararray.chararray.nbytes"><code class="xref py py-obj docutils literal"><span class="pre">nbytes</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-67">数组的元素消耗的总字节数。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-68"><a class="reference internal" href="numpy.core.defchararray.chararray.ndim.html#numpy.core.defchararray.chararray.ndim" title="numpy.core.defchararray.chararray.ndim"><code class="xref py py-obj docutils literal"><span class="pre">ndim</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-69">数组尺寸数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-70"><a class="reference internal" href="numpy.core.defchararray.chararray.real.html#numpy.core.defchararray.chararray.real" title="numpy.core.defchararray.chararray.real"><code class="xref py py-obj docutils literal"><span class="pre">real</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-71">数组的真实部分。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-72"><a class="reference internal" href="numpy.core.defchararray.chararray.shape.html#numpy.core.defchararray.chararray.shape" title="numpy.core.defchararray.chararray.shape"><code class="xref py py-obj docutils literal"><span class="pre">shape</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-73">数组维数组。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-74"><a class="reference internal" href="numpy.core.defchararray.chararray.size.html#numpy.core.defchararray.chararray.size" title="numpy.core.defchararray.chararray.size"><code class="xref py py-obj docutils literal"><span class="pre">size</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-75">数组中的元素数。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-76"><a class="reference internal" href="numpy.core.defchararray.chararray.strides.html#numpy.core.defchararray.chararray.strides" title="numpy.core.defchararray.chararray.strides"><code class="xref py py-obj docutils literal"><span class="pre">strides</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-77">遍历数组时，在每个维度中步进的字节数组。</span></td>
</tr>
</tbody>
</table>
<p class="rubric"><span class="yiyi-st" id="yiyi-78">方法</span></p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-79"><a class="reference internal" href="numpy.core.defchararray.chararray.astype.html#numpy.core.defchararray.chararray.astype" title="numpy.core.defchararray.chararray.astype"><code class="xref py py-obj docutils literal"><span class="pre">astype</span></code></a>（dtype [，order，casting，subok，copy]）</span></td>
<td><span class="yiyi-st" id="yiyi-80">数组的复制，强制转换为指定的类型。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-81"><a class="reference internal" href="numpy.core.defchararray.chararray.copy.html#numpy.core.defchararray.chararray.copy" title="numpy.core.defchararray.chararray.copy"><code class="xref py py-obj docutils literal"><span class="pre">copy</span></code></a>（[order]）</span></td>
<td><span class="yiyi-st" id="yiyi-82">返回数组的副本。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-83"><a class="reference internal" href="numpy.core.defchararray.chararray.count.html#numpy.core.defchararray.chararray.count" title="numpy.core.defchararray.chararray.count"><code class="xref py py-obj docutils literal"><span class="pre">count</span></code></a>（sub [，start，end]）</span></td>
<td><span class="yiyi-st" id="yiyi-84">返回一个数组，其中在[<em class="xref py py-obj">开始</em>，<em class="xref py py-obj">结束</em>]范围内具有子串<em class="xref py py-obj">sub</em>的不重叠出现次数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-85"><a class="reference internal" href="numpy.core.defchararray.chararray.decode.html#numpy.core.defchararray.chararray.decode" title="numpy.core.defchararray.chararray.decode"><code class="xref py py-obj docutils literal"><span class="pre">decode</span></code></a>（[encoding，errors]）</span></td>
<td><span class="yiyi-st" id="yiyi-86">逐个调用<em class="xref py py-obj">str.decode</em>。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-87"><a class="reference internal" href="numpy.core.defchararray.chararray.dump.html#numpy.core.defchararray.chararray.dump" title="numpy.core.defchararray.chararray.dump"><code class="xref py py-obj docutils literal"><span class="pre">dump</span></code></a>（file）</span></td>
<td><span class="yiyi-st" id="yiyi-88">将数组的pickle转储到指定的文件。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-89"><a class="reference internal" href="numpy.core.defchararray.chararray.dumps.html#numpy.core.defchararray.chararray.dumps" title="numpy.core.defchararray.chararray.dumps"><code class="xref py py-obj docutils literal"><span class="pre">dumps</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-90">以字符串形式返回数组的pickle。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-91"><a class="reference internal" href="numpy.core.defchararray.chararray.encode.html#numpy.core.defchararray.chararray.encode" title="numpy.core.defchararray.chararray.encode"><code class="xref py py-obj docutils literal"><span class="pre">encode</span></code></a>（[encoding，errors]）</span></td>
<td><span class="yiyi-st" id="yiyi-92">逐个调用<em class="xref py py-obj">str.encode</em>。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-93"><a class="reference internal" href="numpy.core.defchararray.chararray.endswith.html#numpy.core.defchararray.chararray.endswith" title="numpy.core.defchararray.chararray.endswith"><code class="xref py py-obj docutils literal"><span class="pre">endswith</span></code></a>（suffix [，start，end]）</span></td>
<td><span class="yiyi-st" id="yiyi-94">返回<em class="xref py py-obj">True</em>的布尔数组，<em class="xref py py-obj">self</em>中的字符串元素以<em class="xref py py-obj">后缀</em>结尾，否则<em class="xref py py-obj">False</em>。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-95"><a class="reference internal" href="numpy.core.defchararray.chararray.expandtabs.html#numpy.core.defchararray.chararray.expandtabs" title="numpy.core.defchararray.chararray.expandtabs"><code class="xref py py-obj docutils literal"><span class="pre">expandtabs</span></code></a>（[tabsize]）</span></td>
<td><span class="yiyi-st" id="yiyi-96">返回每个字符串元素的副本，其中所有制表符字符都由一个或多个空格替换。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-97"><a class="reference internal" href="numpy.core.defchararray.chararray.fill.html#numpy.core.defchararray.chararray.fill" title="numpy.core.defchararray.chararray.fill"><code class="xref py py-obj docutils literal"><span class="pre">fill</span></code></a>（value）</span></td>
<td><span class="yiyi-st" id="yiyi-98">使用标量值填充数组。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-99"><a class="reference internal" href="numpy.core.defchararray.chararray.find.html#numpy.core.defchararray.chararray.find" title="numpy.core.defchararray.chararray.find"><code class="xref py py-obj docutils literal"><span class="pre">find</span></code></a>（sub [，start，end]）</span></td>
<td><span class="yiyi-st" id="yiyi-100">对于每个元素，返回字符串中找到子字符串<em class="xref py py-obj">sub</em>的最低索引。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-101"><a class="reference internal" href="numpy.core.defchararray.chararray.flatten.html#numpy.core.defchararray.chararray.flatten" title="numpy.core.defchararray.chararray.flatten"><code class="xref py py-obj docutils literal"><span class="pre">flatten</span></code></a>（[order]）</span></td>
<td><span class="yiyi-st" id="yiyi-102">将折叠的数组的副本返回到一个维度。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-103"><a class="reference internal" href="numpy.core.defchararray.chararray.getfield.html#numpy.core.defchararray.chararray.getfield" title="numpy.core.defchararray.chararray.getfield"><code class="xref py py-obj docutils literal"><span class="pre">getfield</span></code></a>（dtype [，offset]）</span></td>
<td><span class="yiyi-st" id="yiyi-104">将给定数组的字段返回为特定类型。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-105"><a class="reference internal" href="numpy.core.defchararray.chararray.index.html#numpy.core.defchararray.chararray.index" title="numpy.core.defchararray.chararray.index"><code class="xref py py-obj docutils literal"><span class="pre">index</span></code></a>（sub [，start，end]）</span></td>
<td><span class="yiyi-st" id="yiyi-106">像<a class="reference internal" href="numpy.core.defchararray.find.html#numpy.core.defchararray.find" title="numpy.core.defchararray.find"><code class="xref py py-obj docutils literal"><span class="pre">find</span></code></a>，但在找不到子字符串时引发<em class="xref py py-obj">ValueError</em>。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-107"><a class="reference internal" href="numpy.core.defchararray.chararray.isalnum.html#numpy.core.defchararray.chararray.isalnum" title="numpy.core.defchararray.chararray.isalnum"><code class="xref py py-obj docutils literal"><span class="pre">isalnum</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-108">如果字符串中的所有字符都是字母数字，并且至少有一个字符，则为每个元素返回true，否则返回false。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-109"><a class="reference internal" href="numpy.core.defchararray.chararray.isalpha.html#numpy.core.defchararray.chararray.isalpha" title="numpy.core.defchararray.chararray.isalpha"><code class="xref py py-obj docutils literal"><span class="pre">isalpha</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-110">如果字符串中的所有字符都是字母并且至少有一个字符，则为每个元素返回true，否则返回false。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-111"><a class="reference internal" href="numpy.core.defchararray.chararray.isdecimal.html#numpy.core.defchararray.chararray.isdecimal" title="numpy.core.defchararray.chararray.isdecimal"><code class="xref py py-obj docutils literal"><span class="pre">isdecimal</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-112">对于<em class="xref py py-obj">self</em>中的每个元素，如果元素中只有十进制字符，则返回True。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-113"><a class="reference internal" href="numpy.core.defchararray.chararray.isdigit.html#numpy.core.defchararray.chararray.isdigit" title="numpy.core.defchararray.chararray.isdigit"><code class="xref py py-obj docutils literal"><span class="pre">isdigit</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-114">如果字符串中的所有字符都是数字，并且至少有一个字符，则返回true，否则返回false。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-115"><a class="reference internal" href="numpy.core.defchararray.chararray.islower.html#numpy.core.defchararray.chararray.islower" title="numpy.core.defchararray.chararray.islower"><code class="xref py py-obj docutils literal"><span class="pre">islower</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-116">如果字符串中的所有封装字符都是小写字符，并且至少有一个套接字符，则返回true，否则返回false。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-117"><a class="reference internal" href="numpy.core.defchararray.chararray.isnumeric.html#numpy.core.defchararray.chararray.isnumeric" title="numpy.core.defchararray.chararray.isnumeric"><code class="xref py py-obj docutils literal"><span class="pre">isnumeric</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-118">对于<em class="xref py py-obj">self</em>中的每个元素，如果元素中只有数字字符，则返回True。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-119"><a class="reference internal" href="numpy.core.defchararray.chararray.isspace.html#numpy.core.defchararray.chararray.isspace" title="numpy.core.defchararray.chararray.isspace"><code class="xref py py-obj docutils literal"><span class="pre">isspace</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-120">如果字符串中只有空格字符并且至少有一个字符，则为每个元素返回true，否则返回false。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-121"><a class="reference internal" href="numpy.core.defchararray.chararray.istitle.html#numpy.core.defchararray.chararray.istitle" title="numpy.core.defchararray.chararray.istitle"><code class="xref py py-obj docutils literal"><span class="pre">istitle</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-122">如果元素是一个已滴定的字符串并且至少有一个字符，则为每个元素返回true，否则返回false。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-123"><a class="reference internal" href="numpy.core.defchararray.chararray.isupper.html#numpy.core.defchararray.chararray.isupper" title="numpy.core.defchararray.chararray.isupper"><code class="xref py py-obj docutils literal"><span class="pre">isupper</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-124">如果字符串中所有包含字符的字符都是大写且至少有一个字符，则返回true，否则返回false。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-125"><a class="reference internal" href="numpy.core.defchararray.chararray.item.html#numpy.core.defchararray.chararray.item" title="numpy.core.defchararray.chararray.item"><code class="xref py py-obj docutils literal"><span class="pre">item</span></code></a>（\ * args）</span></td>
<td><span class="yiyi-st" id="yiyi-126">将数组的元素复制到标准Python标量并返回。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-127"><a class="reference internal" href="numpy.core.defchararray.chararray.join.html#numpy.core.defchararray.chararray.join" title="numpy.core.defchararray.chararray.join"><code class="xref py py-obj docutils literal"><span class="pre">join</span></code></a>（seq）</span></td>
<td><span class="yiyi-st" id="yiyi-128">返回一个字符串，它是序列<em class="xref py py-obj">seq</em>中字符串的并置。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-129"><a class="reference internal" href="numpy.core.defchararray.chararray.ljust.html#numpy.core.defchararray.chararray.ljust" title="numpy.core.defchararray.chararray.ljust"><code class="xref py py-obj docutils literal"><span class="pre">ljust</span></code></a>（width [，fillchar]）</span></td>
<td><span class="yiyi-st" id="yiyi-130">返回一个数组，元素<em class="xref py py-obj">self</em>在长度<em class="xref py py-obj">宽度</em>的字符串中左对齐。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-131"><a class="reference internal" href="numpy.core.defchararray.chararray.lower.html#numpy.core.defchararray.chararray.lower" title="numpy.core.defchararray.chararray.lower"><code class="xref py py-obj docutils literal"><span class="pre">lower</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-132">返回一个数组，其中元素<em class="xref py py-obj">self</em>转换为小写。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-133"><a class="reference internal" href="numpy.core.defchararray.chararray.lstrip.html#numpy.core.defchararray.chararray.lstrip" title="numpy.core.defchararray.chararray.lstrip"><code class="xref py py-obj docutils literal"><span class="pre">lstrip</span></code></a>（[chars]）</span></td>
<td><span class="yiyi-st" id="yiyi-134">对于<em class="xref py py-obj">self</em>中的每个元素，返回一个删除了前导字符的副本。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-135"><a class="reference internal" href="numpy.core.defchararray.chararray.nonzero.html#numpy.core.defchararray.chararray.nonzero" title="numpy.core.defchararray.chararray.nonzero"><code class="xref py py-obj docutils literal"><span class="pre">nonzero</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-136">返回非零元素的索引。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-137"><a class="reference internal" href="numpy.core.defchararray.chararray.put.html#numpy.core.defchararray.chararray.put" title="numpy.core.defchararray.chararray.put"><code class="xref py py-obj docutils literal"><span class="pre">put</span></code></a>（indices，values [，mode]）</span></td>
<td><span class="yiyi-st" id="yiyi-138">对于所有<em class="xref py py-obj">n</em>，设置<code class="docutils literal"><span class="pre">a.flat [n]</span> <span class="pre">=</span> <span class="pre">在指数。</span></code></span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-139"><a class="reference internal" href="numpy.core.defchararray.chararray.ravel.html#numpy.core.defchararray.chararray.ravel" title="numpy.core.defchararray.chararray.ravel"><code class="xref py py-obj docutils literal"><span class="pre">ravel</span></code></a>（[order]）</span></td>
<td><span class="yiyi-st" id="yiyi-140">返回展平的数组。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-141"><a class="reference internal" href="numpy.core.defchararray.chararray.repeat.html#numpy.core.defchararray.chararray.repeat" title="numpy.core.defchararray.chararray.repeat"><code class="xref py py-obj docutils literal"><span class="pre">repeat</span></code></a>（重复[，轴]）</span></td>
<td><span class="yiyi-st" id="yiyi-142">重复数组的元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-143"><a class="reference internal" href="numpy.core.defchararray.chararray.replace.html#numpy.core.defchararray.chararray.replace" title="numpy.core.defchararray.chararray.replace"><code class="xref py py-obj docutils literal"><span class="pre">replace</span></code></a>（old，new [，count]）</span></td>
<td><span class="yiyi-st" id="yiyi-144">对于<em class="xref py py-obj">self</em>中的每个元素，返回一个字符串的副本，其中所有出现的子字符串<em class="xref py py-obj">old</em>替换为<code class="xref py py-obj docutils literal"><span class="pre">new</span></code>。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-145"><a class="reference internal" href="numpy.core.defchararray.chararray.reshape.html#numpy.core.defchararray.chararray.reshape" title="numpy.core.defchararray.chararray.reshape"><code class="xref py py-obj docutils literal"><span class="pre">reshape</span></code></a>（shape [，order]）</span></td>
<td><span class="yiyi-st" id="yiyi-146">返回包含具有新形状的相同数据的数组。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-147"><a class="reference internal" href="numpy.core.defchararray.chararray.resize.html#numpy.core.defchararray.chararray.resize" title="numpy.core.defchararray.chararray.resize"><code class="xref py py-obj docutils literal"><span class="pre">resize</span></code></a>（new_shape [，refcheck]）</span></td>
<td><span class="yiyi-st" id="yiyi-148">就地更改数组的形状和大小。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-149"><a class="reference internal" href="numpy.core.defchararray.chararray.rfind.html#numpy.core.defchararray.chararray.rfind" title="numpy.core.defchararray.chararray.rfind"><code class="xref py py-obj docutils literal"><span class="pre">rfind</span></code></a>（sub [，start，end]）</span></td>
<td><span class="yiyi-st" id="yiyi-150">For each element in <em class="xref py py-obj">self</em>, return the highest index in the string where substring <em class="xref py py-obj">sub</em> is found, such that <em class="xref py py-obj">sub</em> is contained within [<em class="xref py py-obj">start</em>, <em class="xref py py-obj">end</em>].</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-151"><a class="reference internal" href="numpy.core.defchararray.chararray.rindex.html#numpy.core.defchararray.chararray.rindex" title="numpy.core.defchararray.chararray.rindex"><code class="xref py py-obj docutils literal"><span class="pre">rindex</span></code></a>（sub [，start，end]）</span></td>
<td><span class="yiyi-st" id="yiyi-152">像<a class="reference internal" href="numpy.core.defchararray.rfind.html#numpy.core.defchararray.rfind" title="numpy.core.defchararray.rfind"><code class="xref py py-obj docutils literal"><span class="pre">rfind</span></code></a>，但当找不到子字符串<em class="xref py py-obj">sub</em>时，会引发<em class="xref py py-obj">ValueError</em>。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-153"><a class="reference internal" href="numpy.core.defchararray.chararray.rjust.html#numpy.core.defchararray.chararray.rjust" title="numpy.core.defchararray.chararray.rjust"><code class="xref py py-obj docutils literal"><span class="pre">rjust</span></code></a>（width [，fillchar]）</span></td>
<td><span class="yiyi-st" id="yiyi-154">返回具有<em class="xref py py-obj">self</em>元素的数组，在长度<em class="xref py py-obj">width</em>的字符串中右对齐。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-155"><a class="reference internal" href="numpy.core.defchararray.chararray.rsplit.html#numpy.core.defchararray.chararray.rsplit" title="numpy.core.defchararray.chararray.rsplit"><code class="xref py py-obj docutils literal"><span class="pre">rsplit</span></code></a>（[sep，maxsplit]）</span></td>
<td><span class="yiyi-st" id="yiyi-156">对于<em class="xref py py-obj">self</em>中的每个元素，使用<em class="xref py py-obj">sep</em>作为分隔符字符串返回字符串中的单词列表。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-157"><a class="reference internal" href="numpy.core.defchararray.chararray.rstrip.html#numpy.core.defchararray.chararray.rstrip" title="numpy.core.defchararray.chararray.rstrip"><code class="xref py py-obj docutils literal"><span class="pre">rstrip</span></code></a>（[chars]）</span></td>
<td><span class="yiyi-st" id="yiyi-158">对于<em class="xref py py-obj">self</em>中的每个元素，返回一个删除了尾随字符的副本。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-159"><a class="reference internal" href="numpy.core.defchararray.chararray.searchsorted.html#numpy.core.defchararray.chararray.searchsorted" title="numpy.core.defchararray.chararray.searchsorted"><code class="xref py py-obj docutils literal"><span class="pre">searchsorted</span></code></a>（v [，side，sorter]）</span></td>
<td><span class="yiyi-st" id="yiyi-160">查找索引，其中v的元素应插入到a以维持顺序。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-161"><a class="reference internal" href="numpy.core.defchararray.chararray.setfield.html#numpy.core.defchararray.chararray.setfield" title="numpy.core.defchararray.chararray.setfield"><code class="xref py py-obj docutils literal"><span class="pre">setfield</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-162">将值放入由数据类型定义的字段中的指定位置。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-163"><a class="reference internal" href="numpy.core.defchararray.chararray.setflags.html#numpy.core.defchararray.chararray.setflags" title="numpy.core.defchararray.chararray.setflags"><code class="xref py py-obj docutils literal"><span class="pre">setflags</span></code></a>（[write，align，uic]）</span></td>
<td><span class="yiyi-st" id="yiyi-164">分别设置数组标志WRITEABLE，ALIGNED和UPDATEIFCOPY。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-165"><a class="reference internal" href="numpy.core.defchararray.chararray.sort.html#numpy.core.defchararray.chararray.sort" title="numpy.core.defchararray.chararray.sort"><code class="xref py py-obj docutils literal"><span class="pre">sort</span></code></a>（[axis，kind，order]）</span></td>
<td><span class="yiyi-st" id="yiyi-166">就地对数组进行排序。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-167"><a class="reference internal" href="numpy.core.defchararray.chararray.split.html#numpy.core.defchararray.chararray.split" title="numpy.core.defchararray.chararray.split"><code class="xref py py-obj docutils literal"><span class="pre">split</span></code></a>（[sep，maxsplit]）</span></td>
<td><span class="yiyi-st" id="yiyi-168">对于<em class="xref py py-obj">self</em>中的每个元素，使用<em class="xref py py-obj">sep</em>作为分隔符字符串返回字符串中的单词列表。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-169"><a class="reference internal" href="numpy.core.defchararray.chararray.splitlines.html#numpy.core.defchararray.chararray.splitlines" title="numpy.core.defchararray.chararray.splitlines"><code class="xref py py-obj docutils literal"><span class="pre">splitlines</span></code></a>（[keepends]）</span></td>
<td><span class="yiyi-st" id="yiyi-170">对于<em class="xref py py-obj">self</em>中的每个元素，返回元素中的行的列表，在行边界处断开。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-171"><a class="reference internal" href="numpy.core.defchararray.chararray.squeeze.html#numpy.core.defchararray.chararray.squeeze" title="numpy.core.defchararray.chararray.squeeze"><code class="xref py py-obj docutils literal"><span class="pre">squeeze</span></code></a>（[axis]）</span></td>
<td><span class="yiyi-st" id="yiyi-172">从<em class="xref py py-obj">a形状删除单维条目</em>。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-173"><a class="reference internal" href="numpy.core.defchararray.chararray.startswith.html#numpy.core.defchararray.chararray.startswith" title="numpy.core.defchararray.chararray.startswith"><code class="xref py py-obj docutils literal"><span class="pre">startswith</span></code></a>（prefix [，start，end]）</span></td>
<td><span class="yiyi-st" id="yiyi-174">返回<em class="xref py py-obj">True</em>的布尔数组，其中<em class="xref py py-obj">self</em>中的字符串元素以<em class="xref py py-obj">前缀</em>开头，否则为<em class="xref py py-obj">False</em>。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-175"><a class="reference internal" href="numpy.core.defchararray.chararray.strip.html#numpy.core.defchararray.chararray.strip" title="numpy.core.defchararray.chararray.strip"><code class="xref py py-obj docutils literal"><span class="pre">strip</span></code></a>（[chars]）</span></td>
<td><span class="yiyi-st" id="yiyi-176">对于<em class="xref py py-obj">self</em>中的每个元素，返回一个删除前导和尾随字符的副本。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-177"><a class="reference internal" href="numpy.core.defchararray.chararray.swapaxes.html#numpy.core.defchararray.chararray.swapaxes" title="numpy.core.defchararray.chararray.swapaxes"><code class="xref py py-obj docutils literal"><span class="pre">swapaxes</span></code></a>（axis1，axis2）</span></td>
<td><span class="yiyi-st" id="yiyi-178">返回数组的视图，其中<em class="xref py py-obj">axis1</em>和<em class="xref py py-obj">axis2</em>互换。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-179"><a class="reference internal" href="numpy.core.defchararray.chararray.swapcase.html#numpy.core.defchararray.chararray.swapcase" title="numpy.core.defchararray.chararray.swapcase"><code class="xref py py-obj docutils literal"><span class="pre">swapcase</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-180">对于<em class="xref py py-obj">self</em>中的每个元素，返回大写字符的字符串的副本转换为小写，反之亦然。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-181"><a class="reference internal" href="numpy.core.defchararray.chararray.take.html#numpy.core.defchararray.chararray.take" title="numpy.core.defchararray.chararray.take"><code class="xref py py-obj docutils literal"><span class="pre">take</span></code></a>（indices [，axis，out，mode]）</span></td>
<td><span class="yiyi-st" id="yiyi-182">返回由给定索引处的<em class="xref py py-obj">a</em>元素组成的数组。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-183"><a class="reference internal" href="numpy.core.defchararray.chararray.title.html#numpy.core.defchararray.chararray.title" title="numpy.core.defchararray.chararray.title"><code class="xref py py-obj docutils literal"><span class="pre">title</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-184">对于<em class="xref py py-obj">self</em>中的每个元素，返回字符串的缩排版本：字词以大写字符开头，所有剩余的套用字符都是小写字母。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-185"><a class="reference internal" href="numpy.core.defchararray.chararray.tofile.html#numpy.core.defchararray.chararray.tofile" title="numpy.core.defchararray.chararray.tofile"><code class="xref py py-obj docutils literal"><span class="pre">tofile</span></code></a>（fid [，sep，format]）</span></td>
<td><span class="yiyi-st" id="yiyi-186">将数组作为文本或二进制（默认）写入文件。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-187"><a class="reference internal" href="numpy.core.defchararray.chararray.tolist.html#numpy.core.defchararray.chararray.tolist" title="numpy.core.defchararray.chararray.tolist"><code class="xref py py-obj docutils literal"><span class="pre">tolist</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-188">将数组返回为（可能是嵌套的）列表。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-189"><a class="reference internal" href="numpy.core.defchararray.chararray.tostring.html#numpy.core.defchararray.chararray.tostring" title="numpy.core.defchararray.chararray.tostring"><code class="xref py py-obj docutils literal"><span class="pre">tostring</span></code></a>（[order]）</span></td>
<td><span class="yiyi-st" id="yiyi-190">在数组中构造包含原始数据字节的Python字节。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-191"><a class="reference internal" href="numpy.core.defchararray.chararray.translate.html#numpy.core.defchararray.chararray.translate" title="numpy.core.defchararray.chararray.translate"><code class="xref py py-obj docutils literal"><span class="pre">translate</span></code></a>（table [，deletechars]）</span></td>
<td><span class="yiyi-st" id="yiyi-192">对于<em class="xref py py-obj">self</em>中的每个元素，返回字符串的副本，其中可选参数<em class="xref py py-obj">deletechars</em>中出现的所有字符都将被删除，其余字符已通过给定的转换表。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-193"><a class="reference internal" href="numpy.core.defchararray.chararray.transpose.html#numpy.core.defchararray.chararray.transpose" title="numpy.core.defchararray.chararray.transpose"><code class="xref py py-obj docutils literal"><span class="pre">transpose</span></code></a>（\ * axes）</span></td>
<td><span class="yiyi-st" id="yiyi-194">返回具有轴转置的数组的视图。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-195"><a class="reference internal" href="numpy.core.defchararray.chararray.upper.html#numpy.core.defchararray.chararray.upper" title="numpy.core.defchararray.chararray.upper"><code class="xref py py-obj docutils literal"><span class="pre">upper</span></code></a>()</span></td>
<td><span class="yiyi-st" id="yiyi-196">返回具有转换为大写的<em class="xref py py-obj">self</em>元素的数组。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-197"><a class="reference internal" href="numpy.core.defchararray.chararray.view.html#numpy.core.defchararray.chararray.view" title="numpy.core.defchararray.chararray.view"><code class="xref py py-obj docutils literal"><span class="pre">view</span></code></a>（[dtype，type]）</span></td>
<td><span class="yiyi-st" id="yiyi-198">数组的新视图与相同的数据。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-199"><a class="reference internal" href="numpy.core.defchararray.chararray.zfill.html#numpy.core.defchararray.chararray.zfill" title="numpy.core.defchararray.chararray.zfill"><code class="xref py py-obj docutils literal"><span class="pre">zfill</span></code></a>（width）</span></td>
<td><span class="yiyi-st" id="yiyi-200">返回长度<em class="xref py py-obj">width</em>的字符串中以零填充的数字字符串。</span></td>
</tr>
</tbody>
</table>
<table border="1" class="docutils">
<colgroup>
<col width="41%">
<col width="59%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-201">argsort</span></td>
<td>&#xA0;</td>
</tr>
</tbody>
</table>
</dd></dl>
